package cn.guoxuepeng.hrm.mapper;

import cn.guoxuepeng.hrm.domain.Course;
import cn.guoxuepeng.hrm.query.CourseQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gxp
 * @since 2020-06-18
 */
public interface CourseMapper extends BaseMapper<Course> {

    Page<Course> myPage(@Param("page") Page<Course> coursePage,@Param("query") CourseQuery courseQuery);

    /**
     * 上线
     * @param ids
     * @param time
     */
    void online(@Param("ids") List<Long> ids, @Param("time") long time);

    /**
     * 下线
     * @param ids
     * @param time
     */
    void offline(@Param("ids") List<Long> ids, @Param("time") long time);
}
